home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / AUTOCAD / H108.ZIP / SMAKER22.ZIP / REDEF.LSP < prev    next >
Lisp/Scheme  |  1989-07-23  |  1KB  |  34 lines

  1. ;ReDef.Lsp
  2. ;SCRIPTmaker Sample file
  3. ;(C)1988,89 AZCAD Melbourne Australia
  4. ;
  5. ;Function to redefine a block.
  6. ;Requires that the block redefinition be passed to it and resumes the script 
  7. ;on completion of the redefintion.
  8. ;
  9. ;Sample Call: (ReDef "Window1=Window20")
  10. ;would redefine a block named Window1 with another named Window20
  11. ;
  12. ;Using the multiple variable feature of SCRIPTmaker, a sequence to edit a 
  13. ;series of drawings could include the following lines:
  14. ;                        $(redef "Window1= Z2 ")
  15. ;                        $(redef "Window2= Z3 ")
  16. ;                        $(redef "Window3= Z4 ")
  17. ;A possible list file to match this sequence could read:
  18. ;                        #4
  19. ;                        EAST_EL,WindoFix,WindoSash,WindoLouv
  20. ;                        WEST_EL,WindoFix,WindoFix,WindoSlid
  21. ;                        NOTH_EL,WindoFix,WindFix,WindoFix
  22. ;                        SOTH_EL,WindoLouv,WindoSlid,WindoSlid
  23. ;ReDef would redefine the three window blocks differently for each drawing,
  24. ;taking Z2 from the second field, Z3 from the third field and Z4 from the 
  25. ;fourth field on the list line.
  26. ;
  27. ;Sample Call: (redef "BlocA=BlocB")
  28. ;
  29. (defun ReDef (BlkArg / )
  30.         (command "INSERT" BlkArg nil
  31.                  "RESUME")
  32. )
  33. ;End of function
  34.